<?php


namespace app\common\validate;


use think\Validate;

class Topic extends Validate
{
    protected $rule =   [
        'cate_id'  => 'require',
        'topic_name' =>'require|unique:topic',
        'description' =>'require',
        'cover_image' =>'require',
        'bg_image' =>'require'
    ];

    protected $message  =   [
        'cate_id.require' => '请选择圈子分类',
        'topic_name.require' => '圈子名称必填',
        'topic_name.unique'  => '该圈子名称已经存在',
        'description.require' => '圈子描述必填',
        'cover_image.require' => '请上传圈子封面',
        'bg_image.require' => '请上传圈子背景',
    ];
}